/**
 * @author dumeng
 */
import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/sysDictionary/getDictByCode',
		method: 'POST',
		data: {
			dictCode
		}
	})
}
/**
 * 获取分类树形列表
 */
export function fetchList(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/newsClassify/getClassifyTree',
		method: 'POST',
		data
	})
}
/**
 * 分类新增
 */
export function insert(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/newsClassify/insert',
		method: 'POST',
		data
	})
}
/**
 * 分类编辑
 */
export function update(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/newsClassify/update',
		method: 'POST',
		data
	})
}
/**
 * 分类状态修改
 */
export function updateStatus(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/newsClassify/updateStatus',
		method: 'POST',
		data
	})
}
/**
 * 分类删除
 */
export function del(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/newsClassify/deleteById',
		method: 'POST',
		data
	})
}
/**
 * 分类移动  上移：SY  下移：XY
 */
export function move(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/newsClassify/moveSort',
		method: 'POST',
		data
	})
}